/**
 * 
 */
package com.liyue.service.impl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liyue.dao.UserDao;
import com.liyue.domain.User;
import com.liyue.exception.SystemException;
import com.liyue.service.UserService;

/**
 * @author liyue
 * 
 */
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao user;

	@Override
	public List<User> findAll() {
		List<User> users = new ArrayList<User>();
		try {
			users = user.findAll();
		} catch (SQLException err) {
			throw new SystemException("数据出错！");
		}
		return users;
	}

}
